package handler

import (
	"net/http"

	"gitee.com/infraboard/go-share-examples/mvc-project/dao"
	"gitee.com/infraboard/go-share-examples/mvc-project/model"
	"github.com/julienschmidt/httprouter"
)

func CreateOrder(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
	// 解析来自HTTP,  HTTP DATA obj/ go std lib, RE
	panic("err")

	// 查询库存

	// lock

	// tx

	// -1

	// 异步

	// order --> db  ()
	dao.SaveOrder(&model.Order{})

	w.Write([]byte("Order"))
}
